package br.com.provas;
// Generated 20/10/2014 17:01:06 by Hibernate Tools 4.3.1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbAluno generated by hbm2java
 */
@Entity
@Table(name="tb_aluno"
    ,catalog="bd_provas"
)
public class TbAluno  implements java.io.Serializable {


     private Integer idAluno;
     private TbPerfil tbPerfil;
     private String nome;
     private String email;
     private Integer ra;
     private Set tbTurmas = new HashSet(0);

    public TbAluno() {
    }

    public TbAluno(TbPerfil tbPerfil, String nome, String email, Integer ra, Set tbTurmas) {
       this.tbPerfil = tbPerfil;
       this.nome = nome;
       this.email = email;
       this.ra = ra;
       this.tbTurmas = tbTurmas;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idAluno", unique=true, nullable=false)
    public Integer getIdAluno() {
        return this.idAluno;
    }
    
    public void setIdAluno(Integer idAluno) {
        this.idAluno = idAluno;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idPerfil")
    public TbPerfil getTbPerfil() {
        return this.tbPerfil;
    }
    
    public void setTbPerfil(TbPerfil tbPerfil) {
        this.tbPerfil = tbPerfil;
    }

    
    @Column(name="nome")
    public String getNome() {
        return this.nome;
    }
    
    public void setNome(String nome) {
        this.nome = nome;
    }

    
    @Column(name="email")
    public String getEmail() {
        return this.email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }

    
    @Column(name="ra")
    public Integer getRa() {
        return this.ra;
    }
    
    public void setRa(Integer ra) {
        this.ra = ra;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="tbAluno")
    public Set getTbTurmas() {
        return this.tbTurmas;
    }
    
    public void setTbTurmas(Set tbTurmas) {
        this.tbTurmas = tbTurmas;
    }




}


